import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { AbmModule } from 'angular-baidu-maps';
import { NgxEchartsModule } from 'ngx-echarts';

import { BookComponent } from './book/book.component';
import { CarsComponent } from './cars/cars.component';
import { MapComponent } from './map/map.component';
import { ChartMapComponent } from './chart-map/chart-map.component'

export const route: Routes = [
  { path: 'book', component: BookComponent },
  { path: 'cars', component: CarsComponent },
  { path: 'map', component: MapComponent },
  { path: 'chart-map', component: ChartMapComponent }
];


@NgModule({
  declarations: [
    BookComponent,
    CarsComponent,
    MapComponent,
    ChartMapComponent
  ],
  imports: [
    CommonModule,
    RouterModule.forChild(route),
    AbmModule.forRoot({
      apiKey: 'D7f130ce4be999b80a56cfd12ab06a7a'
    }),
    NgxEchartsModule
  ],
  exports: [
  ]
})
export class DemoModule { }
